window.onload = function () {
  let login = JSON.parse(localStorage.getItem('login'))
  if (login == 1) {
    alert('请先登录')
    window.location.href = 'login.html'
  }
}